#import "CQChatController.h"

@class CQChatTableCell;
@class CQStyleView;
@class MVChatUser;

typedef enum _CQChatMessageType {
	CQChatMessageNormalType = 'noMt',
	CQChatMessageNoticeType = 'nTMt'
} CQChatMessageType;

@interface CQDirectChatController : NSObject {
	id _target;
	CQChatTableCell *_tableCell;
	CQStyleView *_transcriptView;
	UIKeyboard *_keyboard;
	UITextField *_inputField;
	UIView *_inputBarView;
	UIView *_view;
	BOOL _unreadMessages;
	BOOL _unreadHighlightedMessages;
	BOOL _reallyResignInputFirstResponder;
	BOOL _keyboardVisible;
	BOOL _hiding;
	BOOL _active;
}
- (id) initWithTarget:(id) target;

- (id) target;
- (MVChatUser *) user;
- (MVChatConnection *) connection;

- (UIImage *) icon;
- (NSString *) displayName;

- (UIView *) view;
- (CQChatTableCell *) tableCell;

- (NSString *) identifier;

- (void) willShow;
- (void) didShow;

- (void) willHide;
- (void) didHide;

- (void) willClose;

- (void) setKeyboardVisible:(BOOL) visible animate:(BOOL) animate;

- (void) addMessageToDisplay:(NSData *) message fromUser:(MVChatUser *) user asAction:(BOOL) action withIdentifier:(NSString *) identifier andType:(CQChatMessageType) type;
- (void) addMessageToDisplay:(NSData *) message fromUser:(MVChatUser *) user withAttributes:(NSDictionary *) msgAttributes withIdentifier:(NSString *) identifier andType:(CQChatMessageType) type;

- (void) send:(id) sender;

- (unsigned) unreadMessages;
- (unsigned) unreadHighlightedMessages;
@end
